#include "localtcpser.hpp"
#include "localhttp.hpp"

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        SerErr();
        exit(ERR_SER);
    }
    uint16_t tcp_port = std::stoi(argv[1]);

    // 建立守护进程
    //::daemon(0, 0);

    std::unique_ptr<Local_Http::Http> ma_http = std::make_unique<Local_Http::Http>(tcp_port);

    ma_http->Start();

    return 0;
}
